﻿using System;
using System.Collections.Generic;
using DomenModel;

namespace OmsTestProject.MockRepository
{
    public sealed class MockRepositoryContext
    {
        
        private static volatile MockRepositoryContext mockContextInstance;
        private static object syncRoot = new Object();
        
        
        private MockRepositoryContext() 
        {
            CreditCards = new List<CreditCard>();
            ItemDimensions = new List<ItemDimension>();
            Items = new List<Item>();
            OrderDetails = new List<OrderDetails>();
            Orders = new List<Order>();
            Roles = new List<Role>();
            Statuses = new List<Status>();
            Users = new List<User>();

        }

        public  List<User> Users { get; set; }
        public  List<Status> Statuses { get; set; }
        public  List<Role> Roles { get; set; }
        public  List<Order> Orders { get; set; }
        public  List<OrderDetails> OrderDetails { get; set; }
        public  List<ItemDimension> ItemDimensions { get; set; }
        public  List<Item> Items { get; set; }
        //public List<Dimension> Dimensions { get; set; }
        public  List<CreditCard> CreditCards { get; set; }

        public static MockRepositoryContext MockContextInstance
        {
            get
            {
                if (mockContextInstance == null)
                {
                    lock (syncRoot)
                    {
                        if (mockContextInstance == null)
                        {
                          return  mockContextInstance = new MockRepositoryContext();
                        }
                    }
                }
                return mockContextInstance;
            }
        }
    }
}
